package net.itgoo.parkingpay.ui.payconfirm;

import net.itgoo.parkingpay.rest.model.ParkingOrderModel;
import net.itgoo.parkingpay.vendor.mvp.ParkingBasePresenter;
import net.itgoo.parkingpay.vendor.mvp.ParkingBaseView;
import net.itgoo.parkingpay.vendor.mvp.ParkingMVPLoadDataCallback;

/**
 * Created by apple on 16/11/21.
 */
public interface ParkingPayConfirmContract {

    interface View extends ParkingBaseView<Presenter> {
        void showHUD();
        void showLoading();
        void showData(ParkingOrderModel order);
        void showDataError(String error);
        void showPrePaySuccess();
        void showPrePayFailure(String error);
    }

    interface Presenter extends ParkingBasePresenter {
        void createOrder();
        void prePay();
    }

    interface DataSource {
        void createOrder(String userId, long id, ParkingMVPLoadDataCallback callback);
        void prePay(String orderNo, String sessionId, ParkingMVPLoadDataCallback callback);
        ParkingOrderModel order();
        void cancel();
    }
}
